//
//  NewsTableCell.m
//  XIWenLeJian
//
//  Created by lanou3g on 15/11/13.
//  Copyright © 2015年 蓝足. All rights reserved.
//

#import "NewsTableCell.h"

#import "NewsModel.h"

@interface NewsTableCell ()

@property (nonatomic,weak) UITextField *tf;

@end

@implementation NewsTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        UITextField *tf = [[UITextField alloc] init];
        
        tf.placeholder = @"请输入啊啊";
        
        tf.backgroundColor = [UIColor orangeColor];
        
        tf.borderStyle = UITextBorderStyleRoundedRect;
        
        tf.font = [UIFont systemFontOfSize:15];
        
        [self.contentView addSubview:tf];
        
        self.tf = tf;
    }
    
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.tf.frame = CGRectMake(10, 10, 100, 39);
    
}

- (void)setModel:(NewsModel *)model
{
    _model = model;
    
    self.tf.text = model.name;
    
}







- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
